#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
	int one_yuan = 0, five_jiao = 0, one_jiao = 0;
	int count = 0;
	for (one_yuan = 0; one_yuan <= 5; one_yuan++)
	{
		for (five_jiao = 0; five_jiao <= (5 - one_yuan * 1)*10/5; five_jiao++)
		{
			one_jiao = (5 - one_yuan * 1 - five_jiao * 0.5) * 10;
			if (one_jiao >= 0 && one_jiao % 1 == 0)
				count++;
		}
	}
	cout << count;
	return 0;



}